﻿using System;
using System.Collections.Generic;
using System.IO;

namespace Apewer
{

    /// <summary></summary>
    public delegate void Event(object sender);

    /// <summary></summary>
    public delegate void Event<T>(object sender, T argument);

    /// <summary></summary>
    public delegate void Event<T1, T2>(object sender, T1 arg1, T2 arg2);

    /// <summary></summary>
    public delegate void Event<T1, T2, T3>(object sender, T1 arg1, T2 arg2, T3 arg3);

    /// <summary></summary>
    public delegate void Event<T1, T2, T3, T4>(object sender, T1 arg1, T2 arg2, T3 arg3, T4 arg4);

    /// <summary></summary>
    public delegate void Event<T1, T2, T3, T4, T5>(object sender, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5);

    /// <summary></summary>
    public delegate void Event<T1, T2, T3, T4, T5, T6>(object sender, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6);

    /// <summary>数组回调。</summary>
    public delegate T ArrayCallback<T>(object sender, params T[] arguments);

    /// <summary>可枚举回调。</summary>
    public delegate T EnumerableCallback<T>(object sender, IEnumerable<T> arguments);

    /// <summary>列表回调。</summary>
    public delegate T ListCallback<T>(object sender, List<T> arguments);

    ///// <summary></summary>
    //public delegate void EventHandler<T>(object sender, T values) where T : Exception;

    /// <summary>为 ZIP 提取文件提供输出流。参数 Size 为未压缩的大小。</summary>
    public delegate Stream ZipOnFile(string name, long size, DateTime modified);

    /// <summary>处理 ZIP 提取的目录。</summary>
    public delegate void ZipOnDirectory(string name, DateTime modified);

    /// <summary>日志文件回收程序。</summary>
    /// <param name="path">日志文件路径。</param>
    /// <param name="days">日志文件距离今天的天数，例：昨日为 1。</param>
    public delegate void LogCollector(string path, int days);

}
